package com.zcoj.mail.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zcoj.mail.mapper.MailMapper;
import com.zcoj.mail.pojo.Mail;
import com.zcoj.mail.service.MailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author chenbin
 * @version 1.0
 * @description: TODO
 * @date 2023/5/13 11:43
 */
@Slf4j
@Service
public class MailServiceImpl implements MailService {



    @Autowired
    private MailMapper mailMapper;

    @Override

    public List<Mail> getMailData(){
        return mailMapper.selectList(new QueryWrapper<>());
    }

    @Override
    public Integer updateMail(Mail mail) {
        return mailMapper.updateById(mail);
    }

}
